import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View,
  Image,
  TouchableOpacity,
} from 'react-native';
import Util from '../../../util/util';

export default class depositRecharge extends Component < {} > {
  constructor(props) {
    super(props);
  }
  static navigationOptions = {
    headerTitle: '我的押金'
  }
  render() {
    return(
      <View style={styles.container} >
        <View style={styles.topHorizontalView} >
          <Text>我的现有押金：99元</Text>
          <View style={styles.rechareView} ><Text style={{marginBottom: 5,marginTop:5,marginLeft:10,marginRight:10}} >充值</Text></View>
        </View>
        <View style={{ borderColor: '#D7D7D7', borderWidth: Util.pixel }} ></View>

        <View style={{flexDirection:'row',justifyContent:'space-between',margin:10}} >
          <Text>充值时间：2011-11-11 11：11</Text>
          <Text>状态：锁定or可退还</Text>
        </View>
        <View style={{flexDirection:'row',justifyContent:'space-between',marginLeft:50,marginRight:50,marginTop:10}} >
          <Text style={{fontSize: 24,color:'#000'}} >99元</Text>
          <TouchableOpacity style={{paddingLeft:10,paddingRight:10,paddingTop:5,paddingBottom:5,borderColor:'#333',borderWidth:Util.pixel,borderRadius:5}} onPress={this._returnDeposit.bind(this)} >
            <Text>退押金</Text>
          </TouchableOpacity>
        </View>
        <View style={{ borderColor: '#D7D7D7', borderWidth: Util.pixel, marginTop:50*Util.size.height/812 }} />
        <View style={{ borderColor: '#D7D7D7', borderWidth: Util.pixel, marginTop:200*Util.size.height/812 }} />
        <View style={styles.amountView}>
          <Text style={{fontSize:14,color:'#666',marginTop:10}} >应支付金额</Text>
          <Text style={{fontSize:30,color:'#333',marginTop:50}} >¥25.00</Text>
          <Text style={{fontSize:14,color:'#666',marginTop:60}}>请选择支付方式</Text>
        </View>
        <View style={styles.payTypeView} >
          <TouchableOpacity>
            <Image source={{uri: 'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2200875053,59610386&fm=27&gp=0.jpg'}} style={{width:100,height:100}} />
          </TouchableOpacity>
          <TouchableOpacity>
            <Image source={{uri: 'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2200875053,59610386&fm=27&gp=0.jpg'}} style={{width:100,height:100}} />
          </TouchableOpacity>
          <TouchableOpacity>
            <Image source={{uri: 'https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2200875053,59610386&fm=27&gp=0.jpg'}} style={{width:100,height:100}} />
          </TouchableOpacity>
        </View>

      </View>
    );
  }
  _returnDeposit() {

  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    borderTopWidth: Util.pixel,
    borderTopColor: '#D8D8D8',
  },
  topHorizontalView: {
    flexDirection: 'row',
    alignItems: 'center',
    padding: 9,
    justifyContent: 'space-between',
  },
  rechareView: {
    alignItems: 'center',
    borderWidth: Util.pixel,
    borderColor: '#333',
    borderRadius: 5,
  },
  amountView: {
    alignItems: 'center',
  },
  payTypeView: {
    marginTop: 10,
    flexDirection: 'row',
    justifyContent: 'space-around',
  }
})
